/*****************************************************
** Author: 
** Date: 2019-10-12
*
*****************************************************/

#ifndef __CORE_H_
#define __CORE_H_

#ifdef __cplusplus
extern "C"{
#endif


int lua_arch_init(void);
int lua_arch_start(void);
int lua_arch_stop(void);
void lua_arch_lock(void);
void lua_arch_unlock(void);

void lua_arch_data_output(int devid, unsigned char *pbuf, int len);
char *lua_arch_get_snapshot(int *size);
struct lua_arch_devinfo *lua_arch_get_devinfo(void);
int lua_arch_register_syscom(void (*handler)(unsigned char *pbuf, unsigned int len));
int lua_arch_syscom_send(unsigned short syscom_id, unsigned char *pbuf, int len);
int lua_arch_uart_send(unsigned char *pbuf, int len);
int lua_arch_kv_handler(unsigned int cloud_id, \
                const unsigned char *input, unsigned int inlen, \
                unsigned char *output, unsigned int maxsize);

#ifdef __cplusplus
}
#endif

#endif /* __CORE_H_ */

